package server.io.conn.wsp;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Base_WSP1 extends Base_WSP
{
	protected String mProtocal = "";

	public String getmProtocal()
	{
		return mProtocal;
	}

	public void setmProtocal(String mProtocal)
	{
		this.mProtocal = mProtocal;
	}

	public String resolveKey()
	{
		String _key1 = this.extract(this.mProtocal, "Sec-WebSocket-Key1");
		String _key2 = this.extract(this.mProtocal, "Sec-WebSocket-Key2");
		int _key1Num = _key1.length();
		int _key2Num = _key2.length();
		int _key1SpaceNum = _key1.trim().length();
		int _key2SpaceNum = _key2.trim().length();
		// 提取数字
		String _regEx = "[^0-9]";
		Pattern _p = Pattern.compile(_regEx);
		Matcher _m1 = _p.matcher(_key1);
		Matcher _m2 = _p.matcher(_key2);
		
		System.out.println(_m1.replaceAll("").trim());
		System.out.println(_m2.replaceAll("").trim());
		
		
		
		return null;
	}
}

















